/**
 * creater:chuanpeng.zhu@dhc.com.cn
 * create time:2016/05/27
 * describe：用户操作服务。用于用户信息的存储。调用等。
 **/
/*接口地址管理 */
APP
  .service('UrlService', [function () {
    var servers = [{
      dataServer: '',
      imageServer: 'https://m.baidu.com/static/index/plus/',
      payServer: ''
    }, {
      dataServer: '',
      imageServer: '',
      payServer: ''
    }, {
      dataServer: '',
      imageServer: '',
      payServer: ''
    }, {
      dataServer: '',
      imageServer: '',
      payServer: ''
    }];

    var urls = [{
      /* 首页 START */
      HOME_LOOP_AD_LIST: 'www.baidu.com', //首页获取轮播广告列表
      /* 首页 END */
    }, {
      /* 首页 START */
      HOME_LOOP_AD_LIST: '/mall/rest/select-loop-ad-list', //首页获取轮播广告列表
      /* 首页 END */
    }];

    this.getUrl = function (param, isDevelop) {
      if (isDevelop) {
        return servers[CONFIG.environment] + urls[0][param];
      } else {
        return servers[CONFIG.environment] + urls[1][param];
      }
    };

    this.getServer = function (param) {
      return servers[CONFIG.environment][param];
    }

  }])
;

